package com.xiaobias.distributed.pan.scheduled;

import com.xiaobias.distributed.pan.service.BaiduPanFileService;

import javax.annotation.Resource;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling
public class BaiduPanUploadTask {
    @Resource
    private BaiduPanFileService baiduPanFileService;

    @Scheduled(cron = "0/30 55 15 * * ?")
    private void configureTasks() {
        this.baiduPanFileService.uploadFile("/etc/nginx/", "");
        this.baiduPanFileService.uploadFile("/home/longwei", "");
    }
}